<?php
	require_once './handler/check_session.php';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <head>
        <title>Nouveau Dossier</title>
        <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
        <link rel="STYLESHEET" type="text/css" href="style/main_style.css" />
        <link rel="STYLESHEET" type="text/css" href="style/dossier_style.css" />
        <link rel="STYLESHEET" type="text/css" href="style/calendar_style.css" />
        <script type="text/javascript" src="scripts/datepickr.js"></script>
    </head>
    <!-- BODY -->
    <body>
    	<!-- HEADER -->
        <?php require_once'./include/header.php'; ?>
        <!-- MAIN -->
		<div id="main">

		<div><input type="button" name="consulBtn" style="height: 40px;" value="Consulter Dossiers (TEMPO)" onclick="document.location.href='consult_dossier.php'" ></input></div><br/>

			<form id='new_dossier' action='./handler/creation_treatment.php' method='post' accept-charset='UTF-8'>
			<fieldset>
				<legend>Cr&eacute;ation d'un nouveau dossier</legend>
				<div><span class='error'></span></div>
				<table>                         
					<tr>
						<td colspan="2" class="section">Informations client</td>
					</tr>
					<tr>
						<td class='label'><label for='date' >Date* : </label></td>
						<td class='input'><input type='text' name='date' id='date' value='<?php echo date('d-m-Y') ?>' size="25" maxlength="12" />
						<br/><span id='register_date_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='numero_compte_client' >Num&eacute;ro de compte : </label></td>
						<td class='input'><input type='text' name='numero_compte_client' id='numero_compte_client' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td class='label'><label for='nom' >Nom* : </label></td>
						<td class='input'><input type='text' name='nom' id='nom' size="25" maxlength="50" />
						<br/><span id='register_nom_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='prenom' >Pr&eacute;nom* : </label></td>
						<td class='input'><input type='text' name='prenom' id='prenom' size="25" maxlength="50" />
						<br/><span id='register_prenom_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='date_naissance' >Date de naissance* : </label></td>
						<td class='input'><input type='text' name='jour_naissance' id='jour_naissance' size="1" maxlength="2"/>
						-<input type='text' name='mois_naissance' id='mois_naissance' size="1" maxlength="2" />
						-<input type='text' name='annee_naissance' id='annee_naissance' size="4" maxlength="4" />
						<br/><span id='register_date_naissance_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='profession' >Profession* : </label></td>
						<td class='input'><input type='text' name='profession' id='profession' size="25" maxlength="50" />
						<br/><span id='register_profession_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='tel_domicile' >Tel domicile : </label></td>
						<td class='input'><input type='text' name='tel_domicile' id='tel_domicile' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td class='label'><label for='tel_portable' >Tel portable : </label></td>
						<td class='input'><input type='text' name='tel_portable' id='tel_portable' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td class='label'><label for='adresse' >Adresse postale* : </label></td>
						<td class='input'><input type='text' name='adresse' id='adresse' size="25" maxlength="200" />
						<br/><span id='register_adresse_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='cadre' >Cadre : </label></td>
						<td class='input'><input type='checkbox' name='cadre' id='cadre' /></td>
					</tr>
					<tr>
						<td class='label'><label for='fumeur' >Fumeur* : </label></td>
						<td class='input'><input type='checkbox' name='fumeur' id='fumeur' />
						<br/><span id='register_fumeur_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td colspan="2" class="section">Informations Cessionnaire</td>
					</tr>
					<tr>
						<td class='label'><label for='cessionnaire' >Cessionnaire :</label></td>
						<td class='input'><input type='text' name='cessionnaire' id='cessionnaire' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td class='label'><label for='motif_demande' >Motif de la demande :</label></td>
						<td class='input'><input type='text' name='motif_demande' id='motif_demande' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td colspan="2" class="section">Objet du financement</td>
					</tr>
					<tr>
						<td class='label'><label for='montant' >Montant* :</label></td>
						<td class='input'><input type='text' name='montant' id='montant' size="25" maxlength="50" />
						<br/><span id='register_montant_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='duree' >Dur&eacute;e* :</label></td>
						<td class='input'><input type='text' name='duree' id='duree' size="25" maxlength="50" />
						<br/><span id='register_duree_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='taux' >Taux* :</label></td>
						<td class='input'><input type='text' name='taux' id='taux' size="25" maxlength="50" />
						<br/><span id='register_taux_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='couvertures' >Couvertures* :</label></td>
						<td class='input'><input type='text' name='couvertures' id='couvertures' size="25" maxlength="50" />
						<br/><span id='register_couvertures_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='quotas' >Quotit&eacute; &agrave; assurer (en %)* :</label></td>
						<td class='input'><input type='text' name='quotas' id='quotas' size="25" maxlength="50" />
						<br/><span id='register_quotas_errorloc' class='error'></span></td>
					</tr>
					<tr>
						<td class='label'><label for='type_pret' >Type de pr&ecirc;t :</label></td>
						<td class='input'><input type='text' name='type_pret' id='type_pret' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td class='label'><label for='date_signature_prevu' >Date Signature Pr&eacute;visionnelle :</label></td>
						<td class='input'><input type='text' name='date_signature_prevu' id='date_signature_prevu' size="25" maxlength="12" /></td>
					</tr>
					<tr>
						<td class='label'><label for='remarques' >Remarques :</label></td>
						<td class='input'><input type='text' name='remarques' id='remarques' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td colspan="2" class="section">Informations Emetteur</td>
					</tr>
					<tr>
						<td class='label'><label for='date_creation' >Date Creation :</label></td>
						<td class='input'><input type='text' name='date_creation' id='date_creation' size="25" maxlength="12" /></td>
					</tr>
					<tr>
						<td class='label'><label for='nom_emetteur' >Nom du salari&eacute; :</label></td>
						<td class='input'><input type='text' name='nom_emetteur' id='nom_emetteur' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td class='label'><label for='prenom_emetteur' >Pr&eacute;nom du salari&eacute; :</label></td>
						<td class='input'><input type='text' name='prenom_emetteur' id='prenom_emetteur' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td class='label'><label for='numero_matricule_emetteur' >Numero du matricule :</label></td>
						<td class='input'><input type='text' name='numero_matricule_emetteur' id='numero_matricule_emetteur' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td class='label'><label for='numero_tel_emetteur' >Num&eacute;ro de Tel. :</label></td>
						<td class='input'><input type='text' name='numero_tel_emetteur' id='numero_tel_emetteur' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td class='label'><label for='agence_service_emetteur' >Agence / Service :</label></td>
						<td class='input'><input type='text' name='agence_service_emetteur' id='agence_service_emetteur' size="25" maxlength="50" /></td>
					</tr>
					<tr>
						<td class='label'><label for='copie_emetteur' >Disribuer une copie &agrave;</label></td>
						<td class='input'><input type='text' name='copie_emetteur' id='copie_emetteur' size="25" maxlength="50" /></td>
					</tr>
					<tr><td colspan="2"><div class='message'>* champs obligatoires</div></td></tr>
					</table>
					<div class='center_field'>
						<input type='submit' name='Submit' value='Enregistrer' />
					</div>
					<input type='hidden' name='statut' id='statut' value='statut_1'/>
				</fieldset>
			</form>
            <script type="text/javascript">
                new datepickr('date', {
					'dateFormat': 'd-m-Y'
				});

				new datepickr('date_signature_prevu', {
					'dateFormat': 'd-m-Y'
				});
				
				new datepickr('date_creation', {
					'dateFormat': 'd-m-Y'
				});					
			</script>
		</div>
		<!-- FOOTER -->
        <?php require_once'./include/footer.php'; ?>
    </body>
</html>
